/**
 * Created by wangcb on 2016/12/7.
 */

var p;
var u;
chrome.runtime.onConnect.addListener(function (port) {
    //  alert(port.name);
    if (port.name == "client");
    {
        port.onMessage.addListener(function (request) {
            port.postMessage({
                "act": "my", "p": p, "u": u
            });

        });
    }
    if (port.name == "pop");
    {
        port.onMessage.addListener(function (request) {

            p = request.p;
            u = request.u;
        });
    }

});